@extends('common')
@section('content')
    <input id="zongshouru" type="hidden" value="{{$arr[0]}}">
    <input id="zongyuangong" type="hidden" value="{{$arr[1]}}">
    <input id="qita" type="hidden" value="{{$arr[2]}}">
    <script type="text/javascript" src="{{url('assets/js/jquery.jqChart.min.js')}}"></script>

    <script lang="javascript" type="text/javascript">
        $(document).ready(function () {
            var zongshouru=($('#zongshouru').val()-0)/10000;
            var zongyuangong=($('#zongyuangong').val()-0)/10000;
            var qita=($('#qita').val()-0)/10000;

            $('#jqChart').jqChart({
                title: { text: '收入【万】' },
                axes: [
                    {
                        location: 'left',//y轴位置，取值：left,right
                        minimum: 5,//y轴刻度最小值
                        maximum: 50,//y轴刻度最大值
                        interval: 10//刻度间距
                    }
                ],
                series: [
                    //数据1开始
                    {
                        type: 'column',//图表类型，取值：column 柱形图，line 线形图
                        title:'总收入',//标题
                        data: [ ['', zongshouru]]//数据内容，格式[[x轴标题,数值1],[x轴标题,数值2],......]
                    },
                    //数据1结束
                    //数据2
                    {
                        type: 'column',
                        title:'员工薪水',

                        data: [['', zongyuangong]]
                    },
                    //数据2结束
                    //数据3
                    {
                        type: 'column',
                        title:'其它',
                        data: [ ['', qita]]
                    },
                    //数据3结束
                    //数据4
                    {
                        type: 'column',
                        title:'纯收入',
                        data: [['', zongshouru-zongyuangong-qita]]
                    },
                    //数据4结束
                ]
            });
        });
    </script>


    <div style="width:1200px;">
    <div style="width:300px;height:200px;float:left;margin-left:40px;" id="jqChart"></div>
    <div style="width:300px;height:200px;float:left;margin-left:40px;" id="jqChart2"></div>
    <div style="width:300px;height:200px;float:left;margin-left:40px;" id="jqChart3"></div>
    </div>
@stop